// license-header java merge-point
package edu.uoc.tfc.gui.parts.imprimir;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.struts.action.ActionMapping;

import edu.uoc.tfc.web.DownloadWrapperVO;

/**
 * @see edu.uoc.tfc.gui.parts.imprimir.ImprimirPartController
 */
public class ImprimirPartControllerImpl extends ImprimirPartController
{
    /**
     * @see edu.uoc.tfc.gui.parts.imprimir.ImprimirPartController#imprimirPart(org.apache.struts.action.ActionMapping, edu.uoc.tfc.gui.parts.imprimir.ImprimirPartForm, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
     */
    public final void imprimirPart(ActionMapping mapping, edu.uoc.tfc.gui.parts.imprimir.ImprimirPartForm form, HttpServletRequest request, HttpServletResponse response) throws Exception
    {
    	DownloadWrapperVO partPDF = getPartService().imprimirPart(
    			form.getPartId());
    	
    	form.setResultat(partPDF);
    }

    /**
     * @see edu.uoc.tfc.gui.parts.imprimir.ImprimirPartController#consultaPart(org.apache.struts.action.ActionMapping, edu.uoc.tfc.gui.parts.imprimir.ConsultaPartForm, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
     */
    public final void consultaPart(ActionMapping mapping, edu.uoc.tfc.gui.parts.imprimir.ConsultaPartForm form, HttpServletRequest request, HttpServletResponse response) throws Exception
    {
    	form.setPart(
    			getPartService().getPart(form.getId()));
    }

}